Semantic Web  •  Week 01

Introduction to the Semantic Web

Motivation, the layer architecture, the core concepts and an introduction to the term project

Graduate Semantic Web Course  •  CMPE 583  •  A 10-Week Programme

Course Schedule

From theory to a working system in ten weeks

WeekTopicContribution to the project
01Introduction to the Semantic WebProblem statement, toolchain setup
02XML & XML SchemaStructuring the product data
03RDF & RDFSThe triple model, the vocabulary
04OWL FundamentalsClass, Property, Individual
05Advanced OWL & ProtégéRestriction, cardinality
06OWL-SThe recommendation engine as a service
07SWRL7 inference rules (S1–S7)
08OWL API-I with JavaBuilding the ontology programmatically
09OWL API-II & ReasonerInference with HermiT / Pellet
10SWRL API & FinalThe end-to-end working system

Week 01  •  Objectives

By the end of this week

  • you will be able to explain the difference between the Document Web and the Data Web with examples;
  • you will be able to name every layer of the Semantic Web architecture and its responsibility;
  • you will be able to use the notions of ontology, class, property, individual and axiom correctly;
  • you will be able to show where the Open World Assumption departs from database logic;
  • you will be able to describe the goal and the architecture of the term project (the allergy ontology).

01

Motivation: Why the Semantic Web?

Today's Web was written for people. What would a Web written for machines look like?

The Web today: a web of documents

HTML says how the content should look; it does not say what it means.

For the browser there is no type difference between "Nisin" and "36" — both are text nodes.

<div class="urun"> <h3>Eti Chocolate</h3> <p>Ingredients: Ascorbic acid, Nisin, Soy lecithin</p> </div>

No software can answer the question "is this product risky for someone with a lactose allergy?" from this page.

Syntax is not meaning

HTML

<p>Nisin</p>

Presentation. Machine: "text".

XML

<katki>Nisin</katki>

Structure. Machine: "a field named katki".

OWL + SWRL

Nisin a FoodAdditives . Nisin Triggers Lactose .

Meaning. Machine: "it triggers a lactose allergy" → it can infer.

The traditional Web and the Semantic Web

AspectTraditional Web (Document Web)Semantic Web (Data Web)
Basic unitPage / documentResource and triple
LinkUnnamed hyperlinkA relation with defined meaning (Triggers)
Where the meaning isIn the mind of the readerInside the model, formal
AccessKeyword searchQuery + inference (SPARQL / SQWRL)
IntegrationManual mappingAutomatic, through shared IRIs
New knowledgeWritten by a humanProduced by the reasoner and the rules

Data, information, knowledge

Veri

"Nisin"

A symbol without context

Information

EAN_00004 Contain Nisin

Data placed in a context

Bilgi

Nisin Triggers Lactose

Relation + rule: inference becomes possible

Decision

PersonAtRisk(TC_001)

A conclusion that turns into action

Semantic Web technologies move the third step of this ladder to the machine; the fourth step is the job of the application layer.

Where does keyword search break down?

QuestionKeyword searchSemantic system
"Products containing Nisin"Works — text matchingWorks
"Products that are risky for people with a lactose allergy"Fails — "lactose" is not written on the labelInfers it from the additive → allergy trigger chain
"Is the product Ayse chose suitable for her?"No personal profile informationThe person profile and the product content are evaluated together

The difference is not in the amount of data: what is missing is expressing the relations in a form a machine can interpret.

Term Project  •  Problem

Packaged food labels are unreadable for people with allergies

  • Additives are written with a code or a chemical name: Sodium Ascorbate, Soy Lecithin, Casein.
  • The allergen relation is not stated on the label.
  • The same allergen appears under different names.

Target behaviour of the system

User: has a lactose allergy, has chosen Eti Chocolate.

System: the product contains Nisin, Nisin triggers Lactose → risky.

The four products of the project and their contents

Barcode (individual)Product nameAdditivesAllergy triggered
EAN_00001ETI CrackerAlginic_AcidGluten
EAN_00002Ulker DamakPhospore, Soy_LecitinEgg
EAN_00003Dardanel TonCasein, Sodium_AscorbiteLactose, Fish
EAN_00004Eti ChocolateAscorbic_Acid, Nisin, Soy_LecitinLactose, Egg

The last column is not written on the label — it comes from the Triggers relation in the ontology.

The Semantic Web is an extension of the current Web in which information carries a meaning that machines can process.

Berners-Lee, Hendler & Lassila, The Semantic Web, Scientific American, 2001 — the idea in brief

Machine-readable ≠ machine-understandable

Readable

Parsable syntax: CSV, JSON, XML. The machine sees the fields but does not know the relations.

{"katki":"Nisin"}

Understandable

A model with formal semantics: RDF/OWL. The machine infers the type, the restriction and the conclusion.

Nisin Triggers Lactose .

Knowledge representation: why logic-based?

ApproachStrengthLimit
Relational tableSpeed, maturityNo off-schema relations, no inference
Concept mapClear to a humanNo formal semantics
Frame systemsObject-like modellingNo standard inference
Description logic (OWL)Decidable inference, a standardLimited expressiveness (no arithmetic)
Rule-based (SWRL)Chaining, built-in arithmeticThe DL-safe restriction, for decidability

Our project uses the last two rows together: the structure is modelled in OWL, the computation and the chaining in SWRL.

02

The Layer Architecture

Every layer rests on the one below it: identification, syntax, data, vocabulary, logic, rules, queries.

The Semantic Web stack

Trusttrust in the source
Proofthe proof of an inference
Unifying Logic  /  ReasonerHermiT, Pellet
Rules: SWRL, RIF   |   Queries: SPARQL, SQWRLWeeks 07, 10
Ontology: OWLWeeks 04–06
Taxonomy: RDFSWeek 03
Data model: RDFWeek 03
Syntax: XML  /  Turtle  /  JSON-LDWeek 02
Identification: URI / IRI  +  UnicodeWeek 01

The base layer: everything has a name

  • An IRI is a global and unique identifier; it does not have to be an address.
  • If two sources denote the same concept with the same IRI, the data merges by itself.
  • Local names (Nisin) are meaningful only inside a namespace.
Ontology IRI http://EMU/AllergyOntology Namespace (NS) http://EMU/AllergyOntology# Individual IRI ...AllergyOntology#Nisin

The syntax layer: the transport format

The same ontology can be written in several serialisations. Our project file is in RDF/XML format.

<!-- RDF/XML — ALLERGY_FIXED.owl --> <owl:NamedIndividual rdf:about="#Nisin"> <rdf:type rdf:resource="#FoodAdditives"/> <Triggers rdf:resource="#Lactose"/> </owl:NamedIndividual>
# Turtle — the same information :Nisin a :FoodAdditives ; :Triggers :Lactose .

Validation with XML Schema is covered in Week 02, and Turtle syntax in detail in Week 03.

The data layer: RDF and the triple

EAN_00004
Contain──────▶
Nisin
Triggers──────▶
Lactose

Every arrow is a triple: subject – predicate – object. Triples join into a graph; walking over the graph produces new knowledge.

The vocabulary layer: RDFS

  • rdfs:subClassOf for the class hierarchy
  • rdfs:domain / rdfs:range for the context of a property
  • Simple inference: an individual of a subclass is also an individual of the superclass
<owl:Class rdf:about="#Adult"> <rdfs:subClassOf rdf:resource="#Person"/> </owl:Class> <owl:ObjectProperty rdf:about="#Contain"> <rdfs:domain rdf:resource="#Product"/> <rdfs:range rdf:resource="#FoodAdditives"/> </owl:ObjectProperty>

Inference example: Adult(TC_001) → Person(TC_001).

The ontology layer: what does OWL add?

NeedRDFSOWL
Class hierarchyYesYes
DisjointnessNoowl:AllDisjointClasses
RestrictionNosomeValuesFrom, allValuesFrom
Cardinality restrictionNominCardinality
Equivalence / identityNoequivalentClass, sameAs

Projede Person, Product, FoodAdditives, Allergy are declared disjoint — an individual cannot be a product and a person at the same time.

The query layer: SPARQL and SQWRL

SPARQL

The standard query language over an RDF graph (W3C).

SELECT ?u ?f WHERE { ?u :Contain ?f . ?f :Triggers :Lactose . }

SQWRL

A query language built on SWRL; it works over the output of the rules (Week 10).

Person(?p) ^ hasName(?p, ?n) ^ hasBMI(?p, ?b) -> sqwrl:select(?n, ?b)

The rule layer: why is SWRL needed?

OWL is strong in class definitions; but chaining several properties to produce a new relation and arithmetic lie outside OWL.

S6_GenericAllergen Person(?p) ^ hasAllergy(?p, ?al) ^ ChooseProduct(?p, ?u) ^ Contain(?u, ?f) ^ Triggers(?f, ?al) -> Effected_Allergen(?p, ?f)

This rule is the core of the risk analysis in the project; it is covered in detail in Week 07.

The logic layer: a reasoner does three jobs

Consistency

Does the ontology contain a contradiction? isConsistent()

Classification

Which class falls under which? The hidden hierarchy comes out.

Realisation

Of which classes is each individual a member? getTypes()

In the project HermiT does these three jobs; the SWRL rules are run by the Drools-based SWRL rule engine (Weeks 09–10).

The upper layers: proof and trust

  • Proof: "How did you reach this conclusion?" — being able to trace an inference. In domains such as health and food, showing the justification is compulsory.
  • Trust: Is the data source reliable? Signature, provenance and policy information.
  • Our project imitates this layer in a simple way, by reporting the rule that produced each inference: "TC_001 is at risk, because of S6 + S7".

The counterpart of each layer in the project

LayerCounterpart in the projectWeek
IRIhttp://EMU/AllergyOntology#01
XMLALLERGY_FIXED.owl (RDF/XML)02
RDF / RDFSTriples, subClassOf, domain/range03
OWL4 classes, 10 properties, disjoint classes, restrictions04–05
ServiceDescription of the recommendation service with OWL-S06
RulesThe SWRL rules S1–S707
APIOWL API + SWRL API (Java, NetBeans)08–10
QueriesSQWRL queries (Q1–Q3)10

03

Core Concepts

Ontology, class, property, individual, axiom and inference.

What is an ontology?

A formal, explicit specification of a shared conceptualisation.

Formal

A machine can interpret it

Explicit

The concepts are written down

Shared

The community agrees on it

Conceptualisation

The abstract model of the domain

The semantic spectrum

StructureExpressivenessFood example
Term listNames onlyA list of additive names
TaxonomySub/super relationAdditive → preservative → Nisin
ThesaurusSynonyms, related termsCasein ≈ milk protein
OntolojiRestrictions + logic + inference"A product containing Nisin is risky for someone with a lactose allergy"

Our project sits in the last row: thanks to restrictions and rules, the system produces knowledge that was never written down.

Four building blocks

NotionMeaningExample in the project
ClassA set of individualsPerson, Product, FoodAdditives, Allergy
Object PropertyAn individual → individual relationContain, Triggers, hasAllergy, ChooseProduct
Datatype PropertyAn individual → data valuehasAge, hasWeight, hasHeight, hasBMI, hasName
IndividualA concrete objectTC_001, EAN_00004, Nisin, Lactose
AxiomA statement taken to be trueAdult ⊑ Person, disjointness of the classes

The skeleton of the allergy ontology

PersonTC_001 … TC_004
ProductEAN_00001 … 00004
FoodAdditivesNisin, Casein, …
AllergyLactose, Egg, Fish, Gluten
ChooseProduct ▶
Contain ▶
Triggers ▶
◀ hasAllergy

The risk chain travels between these four classes: Person → Product → FoodAdditives → Allergy and back to Person.

How does the namespace look in code?

static final String NS = "http://EMU/AllergyOntology#"; OWLClass risk = df.getOWLClass(IRI.create(NS + "PersonAtRisk")); OWLObjectProperty contain = df.getOWLObjectProperty(IRI.create(NS + "Contain"));

This is how every entity is accessed on the Java side. Writing the namespace wrongly does not raise "class not found"; it silently returns an empty result — the most common mistake.

The Open World Assumption (OWA)

In an ontology, what is not written is not false; it is simply unknown.

This is why the conclusion "this product contains no allergen" can be inferred only if a closure axiom (e.g. a cardinality restriction) is added.

Example from the project

EAN_00001 Contain Alginic_Acid .

We are not saying that this product contains only Alginic_Acid. There may be other additives — this is simply not known yet.

There is no Unique Name Assumption

Unless stated otherwise, two different IRIs may denote the same object. In the food domain this is not a rule but a fact: the same additive is called differently in different countries.

:Soy_Lecitin owl:sameAs :E322 . :Sodium_Ascorbite owl:sameAs :E301 .
:Nisin owl:differentFrom :Casein .

Without disjointness and difference axioms the reasoner says "they may be the same" and does not find the contradiction you expect.

A database and an ontology are not the same thing

AspectRelational database (CWA)Ontology (OWA)
Missing dataIgnored → falseUnknown
SchemaPrescriptive, it rejects dataDescriptive, it produces inferences
The same nameKey uniquenesssameAs links them
New knowledgeThrough INSERTThrough inference as well
InconsistencyConstraint violationA logical contradiction (found by the reasoner)

A frequent mistake: building the ontology like a table and then asking "why is no inference coming?".

Monotonicity and its consequences

  • Adding a new axiom does not invalidate earlier inferences.
  • This is why you cannot write an "exception" in OWL: the statement "all products are safe, except these two" cannot be modelled directly.
  • Practical consequence: model risk with positive evidence — build the trigger chain as rule S6 does.
  • If closed-world behaviour is needed, it is imitated in a limited way with SWRL built-ins and cardinality restrictions.

How does inference work? The TC_001 example

givenTC_001 hasAllergy Lactose ; ChooseProduct EAN_00004 ; hasAge 38 .
givenEAN_00004 Contain Nisin .   Nisin Triggers Lactose .
S6 →TC_001 Effected_Allergen Nisin
S7 →PersonAtRisk(TC_001)
S5 →Adult(TC_001)   (hasAge ≥ 18)

None of them was written into the file by hand; all three are products of the rule engine. This is the final output of the project.

04

The Term Project

A SWRL-based semantic packaged-food analysis and intelligent recommendation system.

What are we going to build?

  • An OWL ontology modelling food products, additives and allergies
  • Seven SWRL rules carrying the risk and recommendation logic
  • A Java application running on the OWL API + SWRL API (NetBeans, Maven)
  • Consistency and classification checks with HermiT
  • Reporting with SQWRL queries

Deliverable output

ALLERGY_FIXED.owl AllergyReasoner (Maven project) ALLERGY_INFERRED.owl console report

System architecture

ProtégéOntology + rule design
OWL fileALLERGY_FIXED.owl
OWL APILoading, inventory, axioms
SWRL API + DroolsRun the rules, materialise them
HermiT + SQWRLChecking and reporting

The eight-step flow Main.java is coded in exactly this order (STEP 1 … STEP 8).

Ontology code: classes

<owl:Class rdf:about="#Person"/> <owl:Class rdf:about="#Product"/> <owl:Class rdf:about="#FoodAdditives"/> <owl:Class rdf:about="#Allergy"/> <owl:Class rdf:about="#Adult"> <rdfs:subClassOf rdf:resource="#Person"/> </owl:Class> <owl:AllDisjointClasses> <owl:members rdf:parseType="Collection"> <rdf:Description rdf:about="#Person"/> <rdf:Description rdf:about="#Product"/> <rdf:Description rdf:about="#FoodAdditives"/> <rdf:Description rdf:about="#Allergy"/> </owl:members> </owl:AllDisjointClasses>

Adult ve PersonAtRisk classes are never populated by hand; their members come from the rules.

Ontology code: object properties

<owl:ObjectProperty rdf:about="#Contain"> <rdfs:domain rdf:resource="#Product"/> <rdfs:range rdf:resource="#FoodAdditives"/> </owl:ObjectProperty> <owl:ObjectProperty rdf:about="#Triggers"> <rdfs:domain rdf:resource="#FoodAdditives"/> <rdfs:range rdf:resource="#Allergy"/> </owl:ObjectProperty>
<owl:ObjectProperty rdf:about="#Lactose_Allergen"> <rdfs:subPropertyOf rdf:resource="#Effected_Allergen"/> <rdfs:domain rdf:resource="#Person"/> <rdfs:range rdf:resource="#FoodAdditives"/> </owl:ObjectProperty>

Four allergen-specific properties (Egg_, Fish_, Gluten_, Lactose_Allergen) sit under a single super-property: Effected_Allergen.

Ontology code: data properties

<owl:DatatypeProperty rdf:about="#hasAge"> <rdfs:domain rdf:resource="#Person"/> <rdfs:range rdf:resource="&xsd;int"/> </owl:DatatypeProperty> <owl:DatatypeProperty rdf:about="#hasBMI"> <rdfs:domain rdf:resource="#Person"/> <rdfs:range rdf:resource="&xsd;double"/> </owl:DatatypeProperty>
PropertyTypeSource
hasNamestringby hand
hasAgeintby hand
hasWeightdoubleby hand
hasHeightdoubleby hand
hasBMIdoublerule S4

Ontology code: product individuals

<owl:NamedIndividual rdf:about="#EAN_00004"> <rdf:type rdf:resource="#Product"/> <Contain rdf:resource="#Ascorbic_Acid"/> <Contain rdf:resource="#Nisin"/> <Contain rdf:resource="#Soy_Lecitin"/> <hasProductName rdf:datatype="&xsd;string">Eti Chocolate</hasProductName> </owl:NamedIndividual> <owl:NamedIndividual rdf:about="#Nisin"> <rdf:type rdf:resource="#FoodAdditives"/> <Triggers rdf:resource="#Lactose"/> </owl:NamedIndividual>

There is no direct link between a product and an allergy; the link is made through the additive — the most important design decision of the model.

Ontology code: person profiles

IndividualNameAgeWeight / HeightAllergyChosen product
TC_001Ayse3867.5 / 1.68LactoseEAN_00004
TC_002FATMA1384.6 / 1.73LactoseEAN_00003
TC_003MEHMET3593.0 / 1.87Fish, LactoseEAN_00003
TC_004AYNUR5491.0 / 1.65Egg, GlutenEAN_00002

TC_002 is thirteen years old: rule S5 will Adult not infer Adult for him — the negative test case of that rule.

The seven SWRL rules of the project

RulePurposeKnowledge produced
S1_FishRiskSodium Ascorbate → fish riskFish_Allergen
S2_LactoseCaseinCasein → lactose riskLactose_Allergen
S3_LactoseNisinNisin → lactose riskLactose_Allergen
S4_BMIBMI computed from weight and heighthasBMI (built-in arithmetic)
S5_AdultAge ≥ 18Adult
S6_GenericAllergenThe generic risk chainEffected_Allergen
S7_RiskClassClassify the affected personPersonAtRisk

Learning to read a rule: S4_BMI

Person(?p) ^ hasWeight(?p, ?w) ^ hasHeight(?p, ?h) ^ swrlb:multiply(?h2, ?h, ?h) ^ swrlb:divide(?b, ?w, ?h2) -> hasBMI(?p, ?b)
  • ^ is logical AND; the arrow goes from the body to the head.
  • In a built-in the first argument is the result: multiply(?h2, ?h, ?h) → ?h2 = ?h × ?h.
  • Every variable used in the head must be bound in the body (safety).
Personw / hInferred BMI
TC_00167.5 / 1.6823.92
TC_00393.0 / 1.8726.60
TC_00491.0 / 1.6533.43

The screen you will see in Protégé: the class hierarchy

Active ontologyEntitiesIndividuals by classSWRLTabOntoGraf
Class hierarchy ▾ owl:Thing ▾ Person Adult PersonAtRisk Product FoodAdditives Allergy
Description: PersonAtRisk SubClass Of   Person Disjoint With   Product, FoodAdditives, Allergy Annotations   rdfs:label "Person at Risk"@en Instances (inferred) TC_001, TC_002, TC_003, TC_004

A schematic view — the tab names and the panel layout match a real Protégé session.

The screen you will see in Protégé: individual assertions

EntitiesIndividuals by classSWRLTab
Individuals: Person TC_001 TC_002TC_003TC_004
Object property assertions hasAllergy  Lactose ChooseProduct  EAN_00004 Effected_Allergen  Nisin   (inferred) Data property assertions hasName "Ayse"  ·  hasAge 38  ·  hasWeight 67.5 hasBMI 23.92   (inferred)

The orange rows are the ones added by the rule engine; Protégé shows inferred assertions in a different colour.

The screen you will see in Protégé: SWRLTab

EntitiesIndividuals by classSWRLTab
NameRule
S5_AdultPerson(?p) ^ hasAge(?p, ?a) ^ swrlb:greaterThanOrEqual(?a, 18) → Adult(?p)
S6_GenericAllergenPerson(?p) ^ hasAllergy(?p, ?al) ^ ChooseProduct(?p, ?u) ^ Contain(?u, ?f) ^ Triggers(?f, ?al) → Effected_Allergen(?p, ?f)
S7_RiskClassPerson(?p) ^ Effected_Allergen(?p, ?f) → PersonAtRisk(?p)
New Edit OWL+SWRL → Drools Run Drools Drools → OWL

The order of the three buttons matters; this flow is shown in detail in Weeks 07 and 10.

The output you will see at the end of term

STEP 3 - HermiT PRE-check (BEFORE the rules) Consistent? true PersonAtRisk members (before the rules, EMPTY expected): [] ADIM 5 — SWRLRuleEngine.infer() (Drools) infer() finished (812 ms). Rule output written into the ontology as ASSERTED. STEP 6 - SQWRL Queries Q1 - BMI per person: Ayse BMI = 23.92 MEHMET BMI = 26.60 Q2 - Risky choices: TC_001 -> EAN_00004 [Nisin] STEP 7 - HermiT POST-check PersonAtRisk members: [TC_001, TC_002, TC_003, TC_004] Adult members : [TC_001, TC_003, TC_004]

The fact that PersonAtRisk list was empty before the rules and is now filled is the proof that the system works.

The tools you will install

ToolRoleNote
Protégé 5.5+Editing the ontology and the rulesWith the SWRLTab plugin
Java JDK 8 / 11Runtime environment8 is recommended for SWRL API compatibility
NetBeansIDEMaven project support
OWL API 4.xManaging the ontology programmaticallyA Maven dependency
SWRL API + DroolsRule engineswrlapi-drools-engine
HermiT / PelletReasonerConsistency and classification

In Week 08 the pom.xml dependencies will be built line by line.

05

Assignment and Project Step

Week 01 deliverable: the working environment + a first concept map.

Assignment 1 — Toolchain setup ve alan analizi

  1. Install Protégé; verify that the SWRLTab tab appears.
  2. Complete the JDK and NetBeans installation; document the version output with a screenshot.
  3. ALLERGY_FIXED.owl file; report the number of classes and individuals.
  4. Transcribe the label of three packaged products of your own choice and propose the additive → allergy mapping.

Deliverable

A 2–3 page PDF: screenshots, the product table, the proposed concept list (separated into class / property / individual).

A detailed solution of this assignment will be presented as a separate part at the end of Week 02.

Assessment criteria

CriterionWeightExpected
Toolchain setup20%Protégé + SWRLTab + JDK + NetBeans all work
Reading the ontology25%The counts and roles of classes, properties and individuals are correct
Domain analysis35%The additive → allergy mapping is justified
Concept distinction20%Class and individual are not confused

The most frequent mistake: Nisin modelling a concrete additive as a class.

References

  • Berners-Lee, T., Hendler, J., Lassila, O. — The Semantic Web, Scientific American, 2001.
  • Allemang, D., Hendler, J. — Semantic Web for the Working Ontologist, 2nd ed., Morgan Kaufmann.
  • Hitzler, P., Krötzsch, M., Rudolph, S. — Foundations of Semantic Web Technologies, CRC Press.
  • W3C — OWL 2 Primer; RDF 1.1 Primer; SWRL Submission (2004).
  • Stanford BMIR — the Protégé documentation and the SWRLTab / SWRLAPI documentation.
  • Horridge, M. — A Practical Guide To Building OWL Ontologies Using Protégé.

Summary  •  1 / 2

The conceptual frame

  • Today's Web encodes presentation; the Semantic Web encodes meaning.
  • The layer stack from the bottom up: IRI → XML → RDF → RDFS → OWL → rules/queries → logic → proof → trust.
  • Ontology = class + property + individual + axiom; its semantic strength comes from the restrictions.
  • The OWA and the absence of the Unique Name Assumption are the two fundamental decisions that separate an ontology from a database.
  • Inference produces knowledge that was never written down; this is where the value of the system lies.

Summary  •  2 / 2

The project and the next step

  • Project domain: packaged food, additives, allergies, person profiles.
  • Four classes, ten properties, seventeen individuals, seven SWRL rules.
  • The risk chain: Person → Product → FoodAdditives → Allergy.
  • Toolchain: Protégé → OWL file → OWL API → SWRL API/Drools → HermiT → SQWRL.

In Week 02

XML & XML Schema: structuring the product data, validation with XSD and preparation for RDF/XML syntax.

Also: the detailed solution of Assignment 1.

Review Questions

Test yourself

  1. Distinguish the Document Web from the Data Web in one sentence.
  2. How do the roles of RDFS and OWL differ in the layer stack?
  3. What is the difference between an IRI and a URL?
  4. Why does the Open World Assumption block the conclusion "this product is safe"?
  1. Which problem in the food domain does the absence of the Unique Name Assumption solve?
  2. Nisin a class or an individual? Justify your answer.
  3. Why can the knowledge produced by rule S6 not be expressed in OWL?
  4. Match the three functions of a reasoner with their counterparts in the project.

Exercise  •  In class

Model a new product

A biscuit with Whey Protein ve Wheat Starch on its label is added to the ontology (EAN_00005).

  1. Which individuals must be added to which classes?
  2. Hangi Triggers assertions are needed?
  3. Which rule(s) fire for TC_004, who chooses this product?
  4. Which new axioms are inferred as a result?

The triples you will write (template)

EAN_00005 a Product . EAN_00005 Contain ________ . ________ a FoodAdditives . ________ Triggers ________ .

The solution will be given in the assignment-solution part of Week 02.